import React, { Component } from 'react';
class Third extends Component {
  render () {
    return (
      <div>
        <h3>third</h3>
        <div>{ this.props.val }</div>
      </div>
    )
  }
}
const Second = (props) => {
  return (
    <div>
      <h2>second</h2>
      <Third val = { props.val }/>
    </div>
  )
}
const First = (props) => {
  return (
    <div>
      <h1>first</h1>
      <Second val={ props.val }/>
    </div>
  )
}
class App extends Component {
  render() {
    return (
      <div>
        <First val="传家宝" />
      </div>
    );
  }
}

export default App;